Types of Array

types of array

Array is the collection of   keys and values. The key can either be an integer or a string. The value can be of any type.

This is usually done for single-line arrays, i.e. array(1, 2) is preferred over array(1, 2, ). For multi-line arrays on the other hand the trailing comma is commonly used, as it allows easier addition of new elements at the end.

Types of array

1.single
2. two dimensional
3. multi- dimensionnal

1. single dimensional array:

2. two dimensional array:

3. mutli-dimensional array:

you can also watch my video tutorials:

 

Related posts